package com.wu.shiro;

import java.util.LinkedHashMap;

/**
 * @author wuyanshen
 * @date 2019-01-13 9:01 PM
 * @discription 1.配置受保护的资源(页面,方法),2.配置访问资源(页面,方法)的权限
 */
public class FilterChainDefinitionMapBuilder {

    public LinkedHashMap<String, String> buildFileterChainDefinitionMap() {
        LinkedHashMap<String, String> map = new LinkedHashMap<>();

        map.put("/shiro/login", "anon");
        map.put("/shiro/register", "anon");
        map.put("/shiro/logout", "logout");
        map.put("/user/list", "user");
        map.put("/401", "anon");
        map.put("/restful/user/login", "anon");
        map.put("/restful/user/test", "anon");
        map.put("/restful/user/api/**", "jwtAuth");

        map.put("/**", "authc");
        return map;
    }
}
